package com.itchu.common.exption;

import lombok.Getter;

/**
 * 自定义异常类，继承RuntimeException类
 */

@Getter
public class MusicException extends RuntimeException{

    private Integer status;

    // 可以自定义异常信息和状态码
    public MusicException(int status, String message) {
        super(message);
        this.status = status;
    }

    public MusicException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMessage());
        this.status = exceptionEnum.getStatus();
    }
}
